#include <unistd.h>
#include <stdio.h>
#include <signal.h>

void hand(int s)
{
    switch (s)
    {
    case 2: printf("哈哈哈，干不掉\n");break;
    // case 3: printf("杀不死\n");break;
        default:break;
    }
}

int main()
{
    signal(SIGINT,hand);
    signal(SIGQUIT,hand);
    int n=0;
    while (1)
    {
        sleep(1);
        printf("正常运行%d %d\n",n++,getpid());
    }
    return 0;
}